/*
 * 
 */
package cn.edu.tyu.finance.util;

import java.math.BigInteger;
import java.security.MessageDigest;

/**
 * 
 * @author wuzhijun
 * @version 1.0
 */
public class StringUtil {
	public static String getMD5(String str) {
		MessageDigest md = null;
	    try {
	        
	       md = MessageDigest.getInstance("MD5");
	       
	        md.update(str.getBytes());
	       
	    } catch (Exception e) {
	        System.out.println("MD5加密出现错误");
	    }
	   
	    return new BigInteger(1, md.digest()).toString(16);
	}

}
